'use strict';

module.exports = appInfo => {
    const config = exports = {};

    // use for cookie sign key, should change to your own and keep security
    config.keys = appInfo.name + '_1537313004247_3968';
    // 跨域配置
    config.cors = {
        origin: '*',
        allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH'
    };
    config.security = {
        csrf: false
    }
    config.mongo = {
        client: {
            host: '132.232.94.151',
            port: '27017',
            name: 'ele',
            options: {
                useNewUrlParser: true
            },
        },
    };
    

    config.middleware = ['params'];

    return config;
};
